<div class="modal fade " id="maintainmanagerModal"  role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">主责投资经理与账户关系批量导入</h3>
            </div>
            <form class="form-horizontal" role="form" id="maintainProqductForm"  method="post"  enctype="multipart/form-data">
                <div class="box-body">                 
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for=tgEmailLabel">评分时间</label>
                        <div class="col-sm-4">
                            <input id="periodTime1" name="periodTime1" type="text" class="form-control"    minlength="6" maxlength="6">
                        </div>                        
                    </div>               
                    
                </div>
                <div class="box-footer">
                    <button type="button" class="btn btn-danger pull-left" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary pull-right" onclick="saveManagerInit()">保存</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    function maintainManagerInit() {
        //初始化产品维护画面        
            $("#id").val("");
            $("#periodTime1").val("");
     
    }
    
    function saveManagerInit(){
    
      
        var periodTime = $("#periodTime1").val();
        //去除空格
      
        periodTime = strTrim(periodTime);

    
        if (periodTime == "") {
            toastr['error']("评分时间不能为空", '异常');
            return;
        }


     
       
          //评分时间   
        if (periodTime != "") {
            if( /[^\d]/g.test(periodTime)){
                toastr['error']("评分时间只能输入整数", '提示');
                return;
            }
            //检查账户号合法位数是否为6位整数
            if(periodTime > 205001 || periodTime <200001){
                toastr['error']("评分时间只能输入6位整数", '提示');
                return;
            }
        }     
     

        var data = {                     
            periodTime : periodTime          
        };
        var url;
    
         url = "/manager/init";
   
        postReq(url, data, function (result) {
            if (result.success) {
                maintainManagerInit();
           
                $("#maintainmanagerModal").modal("hide");
                toastr['success']('产品保存成功', '提示');
                $("#productTable111").bootstrapTable("refresh");
            } else {
                toastr['error'](result.msg, '提示');
            }
        });
    }
</script>
